import {createAPI, createFormAPI} from '@/utils/request'
export const list = data => createFormAPI(`/courses?categories.id=${data.id}`, 'get', data)
export const detail = data => createFormAPI(`/courses/${data.id}`, 'get', data)

export const login = data => createAPI('/api/storeUser/login', 'post', data)
export const register = data => createAPI('/frame/register', 'post', data)
export const logout = data => createAPI('/frame/logout', 'post', data)
export const passwd = data => createAPI('/frame/passwd', 'post', data)
export const profile = data => createAPI('/api/storeUser/profile', 'get', data)
